#!/bin/bash

if [ "$1" = "hide" ]; then
    defaults write com.apple.finder AppleShowAllFiles FALSE
elif [ "$1" = "show" ]; then
    defaults write com.apple.finder AppleShowAllFiles TRUE
else
    echo 'argument error'
    exit 2
fi

killall Finder
